<?php
declare (strict_types = 1);

namespace app\api\model\v1;

use think\facade\Db;
use think\Model;

/**
 * @mixin \think\Model
 */
class Admins extends AppModel
{
    protected $hidden = [
        'password'
    ];
    //
    public function roles()
    {
        return $this->belongsToMany(AuthGroup::class,'auth_group_access','group_id','uid');
    }


    public function unit(){
        return $this->belongsTo(Unit::class,'site_id');
    }

    public function industry(){
        return $this->belongsTo(Industry::class,'industry_id');
    }
}
